package com.srdl.accountRecord.pojo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Builder;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import com.fasterxml.jackson.annotation.JsonFormat;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
 * 描述:
 * author: srdl
 * date: 2022-01-05
 */
@Table(name = "AccountRecord")
@AllArgsConstructor
@NoArgsConstructor
@Data
@Builder
public class AccountRecord implements Serializable {

    /**
     * 主键id
     */
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String id;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 交易类型
     */
    private String transactionType;
    /**
     * 金额
     */
    private BigDecimal money;
    /**
     * 记录时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date recordTime;
    /**
     * 描述
     */
    private String content;

    @JsonIgnore
    private int pageSize = 10;

    @JsonIgnore
    private int pageNum = 1;

    @JsonIgnore
    private String orderBy;

    @JsonIgnore
    private String descFlag;
}
